Skip to content

Add subject inclusion/exclusion filter exercise#37

Merged
juhoinkinen merged 2 commits into
NatLibFi:mainfrom
Lakshmi-bashyam:main
Jun 8, 2026
Merged

Add subject inclusion/exclusion filter exercise#37
juhoinkinen merged 2 commits into
NatLibFi:mainfrom
Lakshmi-bashyam:main

Conversation

@Lakshmi-bashyam

Copy link
Copy Markdown
Collaborator

Add subject inclusion/exclusion filter exercise

This PR adds a new tutorial exercise covering subject inclusion and exclusion filters in Annif (introduced in v1.4).

What's included

Three practical examples using STW and YSO vocabularies:

  • Exclude by RDF type — removing Thsys nodes from STW so only descriptors are suggested (exclude_type=zbwext:Thsys)
  • Exclude by URI — dropping specific high-frequency head labels such as Theory and United States from STW
  • Include by concept scheme — restricting a project to geographic terms only using the YSO places scheme (include_scheme=)

All examples use the tfidf backend and projects.toml configuration format.

Related

Covers the filter syntax introduced in NatLibFi/Annif#846.

@juhoinkinen

Copy link
Copy Markdown
Member

LGTM, I'll merge this now, so it's findable in the tutorial.

@juhoinkinen juhoinkinen merged commit f6d4ebd into NatLibFi:main Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants